const {test} = require("./Test");
const {createPixel, clearCreepMemory, autoBehavior, drawRoom} = require("./Util");
const {judgeCreateCreeps} = require("./Create");
const {autoBuild} = require("./RoomBuild");
const {initDefault} = require("./Default");
const {findRoleCreepsByRoom} = require("./Find");
module.exports.loop = function () {
    initDefault();
    //自动配置Creeps行为
    autoBehavior()
    //自动配置建筑行为
    autoBuild();
    if (Game.time % 10 === 0) {//每隔5s执行一次
        //自动创建士兵
        judgeCreateCreeps();
        //定期清除memory
        clearCreepMemory();
        //生成像素
        createPixel();
    }
    //显示信息
    drawRoom();
    //测试类
    test();
}